<?php

namespace App\Models\Finance;

use App\Models\CustomerManager;
use App\Models\ShopDetail;
use App\Models\SubAccount\SubAccount;
use Illuminate\Database\Eloquent\Model;

class FinanceShopSubAccountBill extends Model
{

    protected $guarded=[];

    protected function serializeDate(\DateTimeInterface $date)
    {
        return $date->format('Y/m/d H:i:s');
    }

    public function bill(){
        return $this->belongsTo(FinanceCustomerBill::class,'bill_id');
    }

    public function shop(){
        return $this->belongsTo(ShopDetail::class,'shop_id');
    }
    public function subAccount(){
        return $this->belongsTo(SubAccount::class,'sub_account_id');
    }
    public function customer(){
        return $this->belongsTo(CustomerManager::class,'customer_id');
    }


}
